import multiprocessing
import time


str_a1 = "aaaaa"
str_b1 = "bbbbb"
str_c1 = "ccccc"
str_d1 = "ddddd"
str_e1 = "eeeee"

str_a2 = " "
str_b2 = " "
str_c2 = " "
str_d2 = " "
str_e2 = " "

a  = multiprocessing.Event()
b  = multiprocessing.Event()
c  = multiprocessing.Event()

def event_a(a):
	global b
	print("event_a: starting")
	a.wait()
	print("event_a: a.is_set()->" + str(a.is_set()))
	b.set()

def event_b():
	global b
	print("event_b: starting")
	b.wait()
	print("event_b: b.is_set()->" + str(b.is_set()))

def event_c(c):
	print("event_c: starting")
	c.wait()
	print("event_c: c.is_set()->" + str(c.is_set()))

if __name__ == "__main__":
	
	w1 = multiprocessing.Process(name = "event_a",
            target = event_a,
            args = (a,))

	w2 = multiprocessing.Process(name = "event_b",
            target = event_b,
            args = ())
			
	w3 = multiprocessing.Process(name = "event_c",
			target = event_c,
            args = (c,))

	w1.start()
	w2.start()
	w3.start()
	
	time.sleep(3)

	print("main: event is set")
	a.set()
	
	
#read   -->0.0078
#hsv    -->0.0144
#gray   -->0.0037
#median -->0.0453
#
#
#
#
#


